<html>
<head>
  <link rel="icon" href="app/editor/static/preview-templates/favicon.ico"></link>
  <meta charset="utf-8">
  <title><%=title%></title>
  <link rel="stylesheet" type="text/css" href="style.css"/>
</head>
<body>
  <canvas id="GameCanvas" oncontextmenu="event.preventDefault()" tabindex="0"></canvas>
  <div id="splash">
    <div class="progress-bar stripes">
      <span style="width: 0%"></span>
    </div>
  </div>
<script src="settings.js" charset="utf-8"></script>
<script src="boot.js" charset="utf-8"></script>
<script src="/socket.io/socket.io.js" charset="utf-8"></script>
<script src="app/engine/bin/<%=cocos2d%>" charset="utf-8"></script>
<script src="preview-scripts/__quick_compile__.js" charset="utf-8"></script>
<script charset="utf-8">
cc.director.loadScene("preview-scene");
cc.game.once(cc.game.EVENT_GAME_INITED, function () {
  // 启动阶段注入代码
  cc.profiler.hideStats();
  cc.game.config.showFPS = false;
});

// 监听 message 事件 
window.addEventListener('message',  (e) => {  
  if (e.data.msg) {
    with(window.cc) {
      eval(e.data.msg);
    }
  }
});

</script>
</body>
</html>